#include <string>
#include <iostream>
 
using namespace std;
 
bool prostoe(int num)
{
    for (size_t i = 2; i < num; i++)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
    return true;
}
 
int main()
{
    string line, word = "";
    getline(cin, line);
    int wd = 0;
    int wrong = 0;
    line += ' ';
    string chislo;
    for (char ch : line)
    {
        if (ch == ' ')
        {
            if (word == "zero") chislo += '0';
            if (word == "one") chislo += '1';
            if (word == "two") chislo += '2';
            if (word == "three") chislo += '3';
            if (word == "four") chislo += '4';
            if (word == "five") chislo += '5';
            if (word == "six") chislo += '6';
            if (word == "seven") chislo += '7';
            if (word == "eight") chislo += '8';
            if (word == "nine") chislo += '9';
            if (word != "zero" && word != "one" && word != "two" &&
                word != "three" && word != "four"
                && word != "five" && word != "six" && word != "seven" &&
                word != "eight" && word != "nine")
            {
                cout << "Wrong input";
                return 0;
            }
            wd++;
            word.clear();
        }
        else
        {
            word += ch;
        }
    }
 
    if (wd == 3)
    {
        int num = stoi(chislo);
        cout << num;
    }
    else
    {
        cout << "Wrong input";
    }


}
